package DAO;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConexionBD {

    public Connection conectar() throws ClassNotFoundException, SQLException {
//Tipo de driver
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        // Class.forName("oracle.jdbc.driver.OracleDriver"); 
//Conexion, usuario, contraseña

        Connection conexion = DriverManager.getConnection("jdbc:odbc:orcl", "fernando", "tigre");
//  Connection conexion = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "system", "tigre");
        //  Connection conexion = DriverManager.getConnection("jdbc:derby:localhost:1527:scott", "scott", "tigre");

        return conexion;

    }
}
